package com.kevin.handler;

/**
 * 责任链模式测试
 *
 * @author kevin
 * @date 2025/8/22
 */
public class HandlerTest {

    public static void main(String[] args) {
        Handler handler1 = new ConcreteHandler1();
        Handler handler2 = new ConcreteHandler2();
        // 定义下一个处理者
        handler1.setNext(handler2);
        // 发起请求
        handler1.handleRequest("two");
    }
}
